<template>
  <div class="systemSetup">
    <!-- 面包屑 -->
    <!-- <div class="systemSetup_nav_div">
      <div>
        <div class="systemSetup_tow_div">系统首页</div>
      </div>
      <div class="systemSetup_three_div" @click="rwefresh">
        <span><i class="el-icon-refresh-right"></i> </span>刷新
      </div>
    </div>-->
    <headNav :cname="cname"></headNav>
    <!-- <div class="systemSetup_active_div"> -->
    <div class="active_one">
      <el-row :gutter="24">
        <el-col :span="6" v-for="val in indexData1" :key="val.count1">
          <div class="systemSetup_active_box">
            <div class="active_img">
              <img src="../../assets/images/SystemSetup/u227.png" alt />
            </div>
            <div class="active_div">
              <p>今日订单总数</p>
              <p>{{ val.count1 }}</p>
            </div>
          </div>
        </el-col>
      </el-row>
    </div>
    <div class="transactions">
      <div class="transactions_one">
        <el-row :gutter="24">
          <el-col :span="24">
            <p>待处理事务</p>
          </el-col>
        </el-row>
      </div>
      <div class="transactions_box">
        <el-row :gutter="24">
          <el-col :span="8" :key="item.count1" v-for="item in indexData2">
            <span>{{ item.name }}</span>
            <i>({{ item.count1 }})</i>
          </el-col>
        </el-row>
      </div>
    </div>
    <div class="transactions">
      <div class="transactions_one">
        <el-row :gutter="24">
          <el-col :span="24">
            <p>运营快捷入口</p>
          </el-col>
        </el-row>
      </div>
      <div class="transactions_box">
        <el-row :gutter="36">
          <el-col :span="3">
            <div class="transactions_icon">
              <img src="../../assets/images/SystemSetup/u287.png" alt />
              <p>添加商品</p>
            </div>
          </el-col>
          <el-col :span="3">
            <div class="transactions_icon">
              <img src="../../assets/images/SystemSetup/u287.png" alt />
              <p>订单列表</p>
            </div>
          </el-col>
          <el-col :span="3">
            <div class="transactions_icon">
              <img src="../../assets/images/SystemSetup/u287.png" alt />
              <p>用户管理</p>
            </div>
          </el-col>
          <el-col :span="3">
            <div class="transactions_icon">
              <img src="../../assets/images/SystemSetup/u287.png" alt />
              <p>交易系统</p>
            </div>
          </el-col>
          <el-col :span="3">
            <div class="transactions_icon">
              <img src="../../assets/images/SystemSetup/u287.png" alt />
              <p>短信营销</p>
            </div>
          </el-col>
          <el-col :span="3">
            <div class="transactions_icon">
              <img src="../../assets/images/SystemSetup/u287.png" alt />
              <p>广告管理</p>
            </div>
          </el-col>
          <el-col :span="3">
            <div class="transactions_icon">
              <img src="../../assets/images/SystemSetup/u287.png" alt />
              <p>专题管理</p>
            </div>
          </el-col>
          <el-col :span="3">
            <div class="transactions_icon">
              <img src="../../assets/images/SystemSetup/u287.png" alt />
              <p>秒杀管理</p>
            </div>
          </el-col>
          <el-col :span="3">
            <div class="transactions_icon">
              <img src="../../assets/images/SystemSetup/u287.png" alt />
              <p>新品推荐</p>
            </div>
          </el-col>
        </el-row>
      </div>
    </div>
  </div>
  <!-- </div> -->
</template>
<script>
// import Hearder from '../../components/Header.vue'
export default {
  data() {
    return {
      cname: '系统首页',
      indexData1: [],
      indexData2: []
    }
  },
  methods: {
    async indexList() {
      const { data: res } = await this.$http.get('/systemsetup')
      // console.log(res, 11111)
      console.log(res, 2222)
      this.indexData1 = res.shuj1
      this.indexData2 = res.shuj2
      console.log(this.indexData1, this.indexData2, 1111111)
    }
  },
  created() {
    this.indexList()
  }
}
</script>
<style lang="less" scope>
// .main_div {
//   .el-main {
//     line-height: 0;
//   }
// }
.systemSetup {
  // 导航nav/
  text-align: none;
  .systemSetup_nav_div {
    border-bottom: 1px solid #ccc;
    padding: 5px 0;
    height: 30px;
    line-height: 30px;
    display: flex;
    justify-content: space-between;

    .systemSetup_tow_div {
      float: left;
      color: #999;
    }
    .systemSetup_three_div {
      &:hover {
        background-color: #ccc;
        cursor: pointer;
      }
      width: 80px;
      background-color: #fff;
      text-align: center;
      border: 1px solid #ccc;
    }
  }
  // 内容

  .systemSetup_active_box {
    height: 80px;
    width: 200px;

    .active_img {
      margin: 12px 8px 0 12px;
      width: 46px;
      height: 48px;
      float: left;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .active_div {
      float: left;
      margin-top: 10px;
      display: inline-block;
    }

    border: 1px solid #ccc;
    // display: flex;
    // justify-content: space-around;
  }
  .active_one {
    .el-col {
      margin-top: 20px;
      margin-bottom: 20px;
    }
  }
  .transactions {
    margin: 8px 0 0 0;
    .el-row {
      margin-left: 0;
      margin-right: 0;
    }
    .el-col-24 {
      height: 45px;
      line-height: 45px;
      background-color: #f3f3f3;
      border: 1px solid #ccc;
      p {
        margin-left: 8px;
        font-weight: 700;
      }
    }
    .el-col-8 {
      width: 400px;
      height: 40px;
      line-height: 40px;
      text-align: center;
      border-bottom: 1px solid #ccc;
      // padding: 10px 0;
      margin-left: 20px;
      display: flex;
      justify-content: space-between;
      i {
        color: red;
      }
    }
    .transactions_one {
      .el-row {
        margin-left: 0px !important;
        margin-right: 0px !important;
      }
    }
    .transactions_box {
      background-color: #fff;
      padding: 10px 0 20px 0;
      .transactions_icon {
        text-align: center;
        padding: 5px;
        &:hover {
          color: lightblue;
          background-color: #ccc;
        }
      }
      .el-row {
        margin: 0 !important;
      }
      .el-col-3 {
        padding: 0 !important;
        // width: 100px;
        width: 11%;
        &:hover {
          background-color: #f9f9f9;
          cursor: pointer;
        }
      }
    }
  }
}
</style>
